﻿using Styx.Common;
using Styx.CommonBot;
using Styx.TreeSharp;
using Action = Styx.TreeSharp.Action;

namespace TuanHA_Combat_Routine
{
    public partial class Classname
    {
        #region Protection Rotation

        private static Composite ProtectionRotation()
        {
            return new PrioritySelector(
                //WriteTimeStartComp(),
                AutoTargetProt(),
                ////Trying to stop bot movement while casting
                //new Decorator(
                //    ret =>
                //    Me.IsCasting,
                //    new Action(delegate { return RunStatus.Success; })
                //    ),
                //But first, facing target
                //new Decorator(
                //    ret =>
                //    THSettings.Instance.AutoFace &&
                //    !IsOverrideModeOn &&
                //    !CurrentTargetCheckFacing &&
                //    CurrentTargetAttackable(10) &&
                //    (Me.CurrentTarget.IsTargetingMeOrPet ||
                //     Me.CurrentTarget.IsTargetingMyPartyMember ||
                //     Me.CurrentTarget.IsTargetingMyRaidMember) &&
                //    !Me.Mounted,
                //    new Action(delegate
                //        {
                //            Me.CurrentTarget.Face();
                //            return RunStatus.Failure;
                //        })
                //    ),
                ReckoningCompProtection(),
                ArdentDefender(),
                BubbleFlashofLightRet(),
                CancelBubbleProtection(),
                //Starting the movement right here
                //MovementMoveBehind(ret => Me.CurrentTarget),
                MovementMoveToMelee(ret => Me.CurrentTarget),
                MovementMoveStop(ret => Me.CurrentTarget, 3),
                //DPS Rotation Here
                LayonHands(),
                //Rebuke(),
                //ArcaneTorrent(),
                AvengingWrathBurstRet(),
                HolyAvengerBurstRet(),
                DivineProtection(),
                DevotionAura(),
                UseHealthStoneHP(),
                UseBattleStandard(),
                GuardianofAncientKingsProt(),
                //AvengersShieldInterrupt(),
                //HammerofJustice(),
                //BlindingLight(),
                //WarStomp(),
                DivineShield(),
                FlashofLightSelflessHealer(),
                FlashofLightSelflessHealerExpiring(),
                HandofProtectionMe(),
                HandofPurity(),
                SacredShieldMeProt(),
                SacredShieldTankProt(),
                HandofProtectionFriendRemoveCC(),
                HandofProtectionFriend(),
                CrowdControlHPSurviveComp(),
                HandofFreedomMyself(),
                SealProtection(),
                HolyPrism(),
                ExecutionSentence(),
                LightHammer(),
                HandofSalvHighThreat(),
                AvengersShieldLoseThreat(),
                WordofGloryMeProt(),
                WordofGloryFriendProt(),
                ShieldoftheRighteous(),
                JudgementRangeRetPvP(),
                HammeroftheRighteousProt(),
                CrusaderStrikeProt(),
                JudgementProt(),
                AvengersShieldGrandCrusader(),
                ConsecrationAoE(),
                AvengersShieldLowestThreatUnit(),
                AvengersShield(),
                HolyWrath(),
                HammerofWrathCurrentTarget(),
                HammerofWrathUnitHammerofWrath(),
                Consecration(),
                WordofGloryMeTopUpRet(),
                FlashofLightMeRet(),
                FlashofLightFriendRet(),
                FlashofLightMeTopUpRet(),
                BuffRotation(),
                RighteousFury(),
                DivinePlea(),
                AutoRez()
                //WriteDebug("")
                );
        }

        #endregion
    }
}